namespace Cos.Core.NHibernate
{
    public class ForumTopicTagDataModel
    {
        #region Constructors and Destructors

        public ForumTopicTagDataModel() {}

        #endregion

        #region Properties

        public virtual int ForumTopicId { get; set; }

        public virtual string TagCultureCode { get; set; }

        public virtual int TagId { get; set; }

        public virtual string TagName { get; set; }

        public virtual int TopicId { get; set; }

        #endregion

        #region Object Overrides

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as ForumTopicTagDataModel;

            return model != null && this.TopicId == model.TopicId && this.TagName == model.TagName &&
                   this.TagCultureCode == model.TagCultureCode;
        }

        public override int GetHashCode()
        {
            return this.TopicId.GetHashCode() 
                ^ this.TagName.GetHashCode() 
                ^ this.TagCultureCode.GetHashCode();
        }

        #endregion
    }
}